﻿<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ include file="/jsplib/pubhead.jsp"%>
<%@ taglib uri="/WEB-INF/myTaglib.tld" prefix="tag"%>
<%@ page import="net.comm.common.ValueMaping" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
	<title>加入社区:i友邻社区</title>
	<link href="${cpath}/css/youlin.css" rel="stylesheet" type="text/css" media="all" />
    <link href="${cpath}/css/register.css" rel="stylesheet" type="text/css" />
    
    <script type="text/javascript" src="<%=path%>/js/imgPreview/CJL.0.1.min.js"></script>
	<script type="text/javascript" src="<%=path%>/js/imgPreview/QuickUpload.js"></script>
	<script type="text/javascript" src="<%=path%>/js/imgPreview/ImagePreviewd.js"></script>
    <style>
	.perview {width:600px;background:#fff;font-size:12px; border-collapse:collapse;}
	.perview td, .perview th {padding:5px;border:1px solid #ccc;}
	.perview th {background-color:#f0f0f0; height:20px;}
	.perview a:link, .perview a:visited, .perview a:hover, .perview a:active {color:#00F;}
	.perview table{ width:100%;border-collapse:collapse;}
	</style>

</head>
<body>
    <div class="wrap">
  <!--页首 start -->
	<%@ include file="/other/menu.jsp"%>
  <!--页首 end -->  
  
  <!--导航面包屑 start -->
  <div class="breadCrumb">
  <div class="breadCrumbNav"><a href="${cpath}/index.jsp">首页</a> >> 加入社区</div>
 </div> 
  <!--导航面包屑 end -->
	<form action="${cpath}/users.do?action=register" name="theForm" id="theForm" method="post" enctype="multipart/form-data" >
        <div class="content">
            <div class="content_1">
                <div class="cn_h1">
                    <div class="cn_h11">
                        step1
                    </div>
                    <div class="cn_h12">
                        注册信息 下列内容中，带<span>*</span>的内容为必输项。
                    </div>
                </div>
                <div class="con_1">
                    <div class="bg3">
                        <div class="bg31">
                            <div class="tbbg">
                                <div class="tbbg1">
                                    <span>*</span>&nbsp;用&nbsp;户&nbsp;名
                                </div>
                                <div class="tbbg2">
                                    <input type="text" name='nick' maxlength="50" value='' class="tbbg21" onblur="check_nick_input(this);"/>
                                </div>
                                <div class="tbbg3" id=regnickinfo>
                                    长度小于25个汉字
                                </div>
                            </div>
                            <div class="tbbg">
                                <div class="tbbg1">
                                    <span>*</span>&nbsp;密&nbsp;&nbsp;&nbsp;&nbsp;码
                                </div>
                                <div class="tbbg2">
                                    <input type="Password" name='password' maxlength="20" value='' onblur="check_passwd_input(this);"   onfocus="click_passwd_input(this);" class="tbbg21"/>
                                </div>
                                <div class="tbbg3" id=regpassinfo>
                                    数字、字母6-12位
                                </div>
                            </div>
                            <div class="tbbg">
                                <div class="tbbg1">
                                    <span>*</span>&nbsp;确认密码
                                </div>
                                <div class="tbbg2">
                                    <input type="Password" onblur="check_chkpass_input(this);" onfocus="click_chkpass_input(this);" name='chkpass' maxlength="20" value='' class="tbbg21"/>
                                </div>
                                <div class="tbbg3" id=regpass2info>
                                    输入与上面相同密码
                                </div>
                            </div>
                            <div class="tbbg">
                                <div class="tbbg1">
                                    <span>*</span>&nbsp;E m a i l
                                </div>
                                <div class="tbbg2">
                                    <input type="text" name='email' maxlength="100" value='' class="tbbg21"  onblur="this.value=DBC2SBC(this.value);check_email_input_new(this);" />
                                </div>
                                <div class="tbbg3" id=regemailinfo>
                                    邮件必须真实
                                </div>
                            </div>
<div class="tbbgx">
                                <div class="tbbgx1">
                                    <span>*</span>&nbsp;现住地址
                                </div>
                                <div class="tbbgx2">
                                   <div class="tbbgx21">
                                     <!--<tag:CNPCA name="work_location" id="work_location" pid="0" cid="0" value='1962'   onchange="getAjaxdata('cnpid',this.value)" onkeydown="catch_keydown(this);" css="sect"/>
                                    -->广东省
                                    <input type="hidden" name='work_location'	value='1962'/>
                                    </div>
                                    <div class="tbbgx21" id=cnpid >
                                    <!--  <tag:CNPCA name="work_sublocation" pid="1962" cid="0" value='1987'  onchange="getAjaxdata('cncid',this.value)" onkeydown="catch_keydown(this);" css="sect"/>
                                       -->深圳市
                                       <input type="hidden" name='work_sublocation'	value='1987'/>
                                    </div>
                                    
                                    <div class="tbbgx21" id=cncid >
                                        <tag:CNPCA name="work_area" id="work_area" cid="1987"  value='0' onchange="locateAddress(this)"  onkeydown="catch_keydown(this);" css="sect"/>
                                    </div>
                                </div>
                                <div class="tbbgx2">
                                 <div class="tbbg112">
                                    <span>*</span>
                                </div>
                                    <div class="tbbg2">
                                        <input type="text" name='village' id="village" value=''  onblur="javascript:getVillage('villageID',this.value);" onfocus="click_village_input(this);"  class="tbbg21"/>
                                    </div>
                                    <div class="tbbg1 pl30"  id=regvillageinfo >
                                       小区
                                    </div>
                                </div>
                                <div class="tbbgx2">
                                <div class="tbbg112">
                                    <span>*</span>
                                </div>
                                    <div class="tbbgc3">
                                        <input type="text" name='building'  maxlength="50" value='' class="tbbgc31"/>
                                    </div>
                                    <div class="tbbc">
                                        栋
                                    </div>
                                    <div class="tbbg112">
                                    <span>*</span>
                                   </div>
                                    <div class="tbbgc3">
                                        <input type="text" name='houseNo'  maxlength="50" value='' class="tbbgc31"/>
                                    </div>
                                    <div class="tbbc">
                                        &nbsp;&nbsp;&nbsp;&nbsp;号
                                    </div>
                                </div>
                            </div>
                            <div class="tbbg">
                                <div class="tbbg1">
                                    真&nbsp;实&nbsp;姓&nbsp;名
                                </div>
                                <div class="tbbg2">
                                   <input type="text" name='name' maxlength="100" value='' class="tbbg21" />
                                </div>
                                <div class="tbbg3" id=regnameinfo>
                                    &nbsp;
                                </div>

                            </div>
                            <div class="tbbg">
                                <div class="tbbg1">
                                    性&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;别
                                </div>
                                <div class="tbbgx21">
                                    <input type="radio" name='sex' value='1'/><img src="${cpath}/icon/icon_boy.gif" width="16" height="16" />&nbsp;
									<input type="radio" name='sex' value='2'/><img src="${cpath}/icon/icon_girl.gif" width="16" height="16" />	
                                </div>
                            </div>
                            <div class="tbbg">
                                <div class="Atbbg1">
                                    身份证号码
                                </div>
                                <div class="tbbg2">
                                    <input type="text" name='certno'  maxlength="30" value='${theForm.certno}' class="tbbg21" onblur="check_certno_input(this);"/>
                                </div>
                                <div class="tbbg3"  id=regcertnoinfo >
                                    &nbsp;
                                </div>
                            </div>
                            <div class="tbbg">
                                <div class="Atbbg1">
                                    房产证号码
                                </div>
                                <div class="tbbg2">
                                    <input type="text" name='fangchanNo' maxlength="100" value='' class="tbbg21" />
                                </div>
                                <div class="tbbg3"  id=regfangchanNoinfo >
                                    &nbsp;
                                </div>
                            </div>
                            <div class="tbbg">
                                <div class="Atbbg1">
                                    房产证照片
                                </div>
                                <div class="tbbg2">
                                    <input type="file" name='fcPicIDPath' value='' class="tbbg21" onchange="check_loadfile(this);" />
                                </div>
                                <div class="tbbg3 pl10"  id=regfcPicIDPathinfo>
                                    <font color=red>（照片经核实后可获10倍注册积分）</font>
                                </div>
                            </div>
                        </div>
                        <div class=" cb">
                        </div>
                        <div class="pa">
                            <div class="pa1">
                                Google地图
                            </div>
                            <div class="pa2">

		   <div id='gbzhdiv' style="display:none">
		  <input name="mapXY" type="hidden" id="mapXY" style=" width:157px" readonly="readOnly" />
		  <input id="MapReset" type="hidden" value="清空坐标" onClick="document.getElementById('mapXY').value='';" />
		  <div style="display: none">
		  <input name="ctl00$ContentRight$txtLoad" type="text" id="ctl00_ContentRight_txtLoad" /></div>
		  <br>
		  <!--<span id="spanMap" style="cursor: pointer; color: Blue;" >
		  <img src="${cpath}/icon/google.gif" style="border: 0px;padding-top:3px;" />打开地图</span>，-->
		  <span style="color: #FF0000">请用鼠标拖拽标注点，小区位置将定位到电子地图上</span>
			<script src="http://ditu.google.cn/maps?file=api&v=2&key=ABQIAAAAw2RKr_U8PRAj9sAvIdD0sxTdTWb9KT-9yfU5ve-sqZhcD-5iHBRWmoMQa85dyvwz9X72DK-6bUz9Cw&sensor=true"  type="text/javascript"  charset='utf-8'> </script>

		  <script type="text/javascript">
		  function GetAddress(evalue) {
			document.getElementById("ctl00_ContentRight_txtLoad").value = evalue;
		  }
		  </script>
		  <div id="divID"> </div>
		  </div>
		   <div id='gmimgdiv' >
			<!--<img id="mappic" src="http://maps.google.com/maps/api/staticmap?markers=color:red|color:red|22.536024805886985,114.0109634399414&zoom=14&size=286x286&sensor=false
			" />-->		  
		  </div>

                            </div>
                        </div>
                    </div>
                    <div class=" lh10">
                    </div>
                </div>
                <div class="step2">
                    <div class="bg4">
                        以上内容仅作为网站注册使用，不对外公开.
                    </div>
                    <div class="cn_h1">
                        <div class="cn_h11">
                            step2
                        </div>
                        <div class="cn_h12">
                            我的资料 请设置每项内容的隐私选项，带<span>*</span>的内容为必输项。
                        </div>
                    </div>
                </div>
                <div class="con_1">
                    <div class="bg3">
                        <div class="bg31">
                            <div class="tbbg">
                                <div class="tbbg1">
                                    个人头像
                                </div>
                                <div class="tbbg2">
                                	<input type="file" id="personalFile" name='picIDPath' value='' class="tbbg21"  onchange="check_loadfile(this);" />
                                </div>
                                <div class="tbbg3"  id=regpicIDPathinfo >
                                    &nbsp;
                                </div>
                            </div>
                            <div class="tbbg">
                                <div class="tbbg1">
                                    出生日期
                                </div>
                                <div class="steptb">
                                    <input type="text" name='birthday' maxlength="8" value='' class="tbbg21" />
                                </div>
                                <div class="tbbgx21 pl10">
                                    <tag:ARRAY  id="birthdaySet" name="birthdaySet" options="<%=ValueMaping.USERSET_TYPE%>" value='1' css="sect"/>
                                </div>
                                <div class="tbbg3 pl10">
                                    日期格式：19861212
                                </div>
                            </div>
                            <div class="tbbg">
                                <div class="tbbg1">
                                    籍&nbsp;&nbsp;&nbsp;&nbsp;贯
                                </div>
                                <div class="tbbgx21">
                                    <tag:CNPCA name="home_location" id="home_location" pid="0" cid="0" value='${theForm.home_location}'   onchange="getAjaxdata('homepid',this.value)" onkeydown="catch_keydown(this);" css="sect"/>
									<span id=homepid style="display:inline">
									<tag:CNPCA name="home_sublocation" pid="${theForm.home_location}" cid="0" value='${theForm.home_sublocation}'  onkeydown="catch_keydown(this);" css="sect"/>
									</span>
                                </div>
                                <div class="tbbgx21 pl10">
                                    <tag:ARRAY  id="home_Set" name="home_Set" options="<%=ValueMaping.USERSET_TYPE%>" value='1' css="sect"/>
                                </div>
                            </div>
                            <div class="tbbg">
                                <div class="tbbg1">
                                    家庭状况
                                </div>
                                <div class="sele1">
                                    <tag:ARRAY  id="famSts" name="famSts" options="<%=ValueMaping.FAMLIY_TYPE%>" value=''  css="sele1"/>
                                </div>
                                <div class="tbbgx21 pl10">
                                <tag:ARRAY  id="famStsSet" name="famStsSet" options="<%=ValueMaping.USERSET_TYPE%>" value='1' css="sect"/>
                                </div>
                            </div>

                            <div class="tbbg">
                                <div class="tbbg1">
                                    居住状况
                                </div>
                                <div class="sele1">
                                    <tag:ARRAY  id="liveSts" name="liveSts" options="<%=ValueMaping.LIVE_TYPE%>" value=''  css="sele1"/>
                                </div>
                                <div class="tbbgx21 pl10">
                                   <tag:ARRAY  id="liveStsSet" name="liveStsSet" options="<%=ValueMaping.USERSET_TYPE%>" value='1' css="sect"/>
                                </div>
                            </div>
                            <div class="tbbg">
                                <div class="tbbg1">
                                    入住时间
                                </div>
                                <div class="steptb">
                                    <input type="text" name='inTime' maxlength="8" value='' class="tbbg21" />
                                </div>
                                <div class="tbbgx21 pl10">
                                   <tag:ARRAY  id="inTimeSet" name="inTimeSet" options="<%=ValueMaping.USERSET_TYPE%>" value='1' css="sect"/>
                                </div>
                                <div class="tbbg3 pl10" id=reginTimeinfo>
                                    输入年月，例如：201007
                                </div>
                            </div>
                            <div class="tbbg">
                                <div class="tbbg1">
                                    毕业中学
                                </div>
                                <div class="steptb">
                                    <input type="text" name='highSchool' maxlength="150" value='' class="tbbg21" />
                                </div>
                                <div class="sttb1">
                                    毕业时间
                                </div>
                                <div class="tbbgc3">
                                    <input type="text" name='hsFinshDate' maxlength="8" value='' class="tbbgc31" />
                                </div>
                                 <div class="tbbg1">
                                   &nbsp;&nbsp; 毕业学校设置
                                </div>
                                <div class="tbbgx21">
                                   <tag:ARRAY  id="schoolSet" name="schoolSet" options="<%=ValueMaping.USERSET_TYPE%>" value='1' css="sect"/>
                                </div>
                            </div>                          
                            <div class="tbbg">
                                <div class="tbbg1">
                                    毕业大学
                                </div>
                                <div class="steptb">
                                    <input type="text" name='college' maxlength="150" value='' class="tbbg21" />
                                </div>
                                <div class="sttb1">
                                    毕业时间
                                </div>
                                <div class="tbbgc3">
                                    <input type="text" name='colFinshDate' maxlength="150" value='' class="tbbgc31" />
                                </div>
                                 <div class="tbbg1">
                                   &nbsp;&nbsp; 毕业学校设置
                                </div>
                                <div class="tbbgx21">
                                   <tag:ARRAY  id="schoolSet2" name="schoolSet2" options="<%=ValueMaping.USERSET_TYPE%>" value='1' css="sect"/>
                                </div>
                            </div>                          
                            <div class="tbbg">
                                <div class="tbbg1">
                                    服&nbsp;&nbsp;&nbsp;&nbsp;役
                                </div>
                                <div class="tbbgx21">
                                    <tag:ARRAY  id="isArmy" name="isArmy" options="<%=ValueMaping.YESNO_FLAG%>" value='2'  css="sect" onchange="chgArmy(this.value);"/>
									<span id="spanarmy" style="display:none;">&nbsp;&nbsp;
									<tag:PROPERTY name="army"  assortID="1"  tagname='请选择' value='' onkeydown="catch_keydown(this);" css="sect"/>
									<tag:ARRAY  id="armySet" name="armySet" options="<%=ValueMaping.USERSET_TYPE%>" value='1' css="sect"/>
									</span> 
                                </div>
                            </div>
                            <div class="tbbg">
                                <div class="tbbg1">
                                    所属行业
                                </div>
                                <div class="steptb">
                                    <input type="text" name='work' maxlength="150" value='' class="tbbg21" />
                                </div>
                                <div class="tbbgx21 pl10">
                                    <tag:ARRAY  id="workSet" name="workSet" options="<%=ValueMaping.USERSET_TYPE%>" value='1' css="sect"/>
                                </div>
                            </div>
                          <!--   <div class="ttb">
                                <div class="tbbg1">
                                   个性标签
                                </div>
                               <div class="ttb2">
                                    <div class="ttb23">
                                        <div class="ttb21">
                                           <input type="checkbox" name='chkboxinterest' value='1'/>
                                        </div>
                                        <div class="ttb22">
                                            文字
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='2'/>
                                        </div>
                                        <div class="ttb22">
                                            艺术
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='3'/>
                                        </div>
                                        <div class="ttb22">
                                            运动
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='4'/>
                                        </div>
                                        <div class="ttb22">
                                            科技
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='5'/>
                                        </div>
                                        <div class="ttb22">
                                            娱乐
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='6'/>
                                        </div>
                                        <div class="ttb22">
                                            亲子
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='7'/>
                                        </div>
                                        <div class="ttb22">
                                            教育
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='8'/>
                                        </div>
                                        <div class="ttb22">
                                            工艺
                                        </div>
                                    </div>
                                    <div class="ttb23">
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='9'/>
                                        </div>
                                        <div class="ttb22">
                                            旅游
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='10'/>
                                        </div>
                                        <div class="ttb22">
                                            时尚
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='11'/>
                                        </div>
                                        <div class="ttb22">
                                            其他
                                        </div>
                                    </div>
                                </div>
                                <div class="tbbgx21 pl10">
                                    <tag:ARRAY  id="interestSet" name="interestSet" options="<%=ValueMaping.USERSET_TYPE%>" value='1' css="sect"/>
                                </div>
                            <div class="tp6">
                                <input id="Button3" type="button" onclick="javascript:doRegister();" value="选择个性" align="left"/>
                            </div>
                            </div> -->
                            <div class="tbbg">
                                <div class="tbbg1">
                                    生&nbsp;&nbsp;&nbsp;&nbsp;肖
                                </div>
                                <div class="tbbgx21">
                                    <tag:ARRAY  id="chzodiac" name="chzodiac" css="sect" options="<%=ValueMaping.SHXIAO_TYPE%>" value=''/>
                                </div>
                            </div>
                            <div class="tbbg">
                                <div class="tbbg1">
                                    星&nbsp;&nbsp;&nbsp;&nbsp;座
                                </div>
                                <div class="tbbgx21">
                                    <tag:ARRAY  id="star" name="star" css="sect" options="<%=ValueMaping.STAR_TYPE%>" value=''/>
                                </div>
                            </div>
                            <div class="tbbg">
                                <div class="tbbg1">
                                    特&nbsp;&nbsp;&nbsp;&nbsp;长
                                </div>
                                <div class="steptb">
                                    <input type="text" name='skill' maxlength="300" value='' class="tbbg21" />
                                </div>
                                <div class="tbbgx21 pl10">
                                    <tag:ARRAY  id="skillSet" name="skillSet" options="<%=ValueMaping.USERSET_TYPE%>" value='1' css="sect"/>
                                </div>
                            </div>
                            <div class="gxqm">
                                <div class="tbbg1">
                                    个性签名
                                </div>
                                <div class="gxqm1">
                                    <textarea name="introduction" class="gxqm2" rows="4" cols="50" ></textarea>
                                </div>
                            </div>                        
                        </div>
                    </div>
                    <div class=" lh10">
                    </div>
                </div>
                <div class="step3">
                    <div class="bg4">
                      
                    </div>
                    <div class="cn_h1">
                        <div class="cn_h11">
                            step3
                        </div>
                        <div class="cn_h12">
                            我的资料 请选填个性标签的内容。
                        </div>
                    </div>
                </div>
                                <div class="con_1">
                    <div class="bg3">
                        <div class="bg31">
                            <div class="tbbg">
                                        <div class="ttb22">
                                           运动：
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='100'/>
                                        </div>
                                        <div class="ttb22">
                                            足球
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='101'/>
                                        </div>
                                        <div class="ttb22">
                                          篮球
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='102'/>
                                        </div>
                                        <div class="ttb22">
                                            高尔夫
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='103'/>
                                        </div>
                                        <div class="ttb22">
                                           网球
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='104'/>
                                        </div>
                                        <div class="ttb22">
                                         羽毛球
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='105'/>
                                        </div>
                                        <div class="ttb22">
                                           健身
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='106'/>
                                        </div>
                                        <div class="ttb22">
                                            户外徒步
                                        </div>                                                       
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='107'/>
                                        </div>
                                        <div class="ttb22">
                                         自行车
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='108'/>
                                        </div>
                                        <div class="ttb22">
                                       功夫
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='109'/>
                                        </div>
                                        <div class="ttb22">
                                           钓鱼
                                        </div>
                                   </div>
                                   <div class="tbbg">
                                        <div class="ttb22">
                                           生活：
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='200'/>
                                        </div>
                                        <div class="ttb22">
                                            亲子
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='201'/>
                                        </div>
                                        <div class="ttb22">
                                       美食
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='202'/>
                                        </div>
                                        <div class="ttb22">
                                            美容
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='203'/>
                                        </div>
                                        <div class="ttb22">
                                           旅游
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='204'/>
                                        </div>
                                        <div class="ttb22">
                                        购物
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='205'/>
                                        </div>
                                        <div class="ttb22">
                                           手工
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='206'/>
                                        </div>
                                        <div class="ttb22">
                                            宠物
                                        </div>                                                       
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='207'/>
                                        </div>
                                        <div class="ttb22">
                                         汽车
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='208'/>
                                        </div>
                                        <div class="ttb22">
                                       养生
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='209'/>
                                        </div>
                                        <div class="ttb22">
                                       股票
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='210'/>
                                        </div>
                                        <div class="ttb22">
                                      教育
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='211'/>
                                        </div>
                                        <div class="ttb22">
                                        网购
                                        </div>
                                        
                                    </div>
                                   <div class="tbbg">
                                        <div class="ttb22">
                                          科技：
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='300'/>
                                        </div>
                                        <div class="ttb22">
                                           数码产品
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='301'/>
                                        </div>
                                        <div class="ttb22">
                                       音响发烧
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='302'/>
                                        </div>
                                        <div class="ttb22">
                                            模型制作
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='303'/>
                                        </div>
                                        <div class="ttb22">
                                          软件分享
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='304'/>
                                        </div>
                                        <div class="ttb22">
                                        游戏分享
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='305'/>
                                        </div>
                                        <div class="ttb22">
                                           科技前沿
                                        </div>                     
                                      </div>   
                                      <div class="tbbg">
                                        <div class="ttb22">
                                          文学：
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='400'/>
                                        </div>
                                        <div class="ttb22">
                                          读书
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='401'/>
                                        </div>
                                        <div class="ttb22">
                                       写作
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='402'/>
                                        </div>
                                        <div class="ttb22">
                                         历史
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='403'/>
                                        </div>
                                        <div class="ttb22">
                                      书法
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='404'/>
                                        </div>
                                        <div class="ttb22">
                                       诗歌
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='405'/>
                                        </div>
                                        <div class="ttb22">
                                     国学
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='406'/>
                                        </div>
                                        <div class="ttb22">
                                       古典
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='407'/>
                                        </div>
                                        <div class="ttb22">
                                       现代
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='408'/>
                                        </div>
                                        <div class="ttb22">
                                          后现代
                                        </div>                     
                                      </div>   
                                      <div class="tbbg">
                                        <div class="ttb22">
                                          艺术：
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='500'/>
                                        </div>
                                        <div class="ttb22">
                                          绘画
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='501'/>
                                        </div>
                                        <div class="ttb22">
                                       音乐
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='502'/>
                                        </div>
                                        <div class="ttb22">
                                         摄影
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='503'/>
                                        </div>
                                        <div class="ttb22">
                                      唱歌
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='504'/>
                                        </div>
                                        <div class="ttb22">
                                      舞蹈
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='505'/>
                                        </div>
                                        <div class="ttb22">
                                     电影
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='506'/>
                                        </div>
                                        <div class="ttb22">
                                      乐器
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='507'/>
                                        </div>
                                        <div class="ttb22">
                                      收藏
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='508'/>
                                        </div>
                                        <div class="ttb22">
                                          欣赏
                                        </div>                     
                                      </div>   
                                      <div class="tbbg">
                                        <div class="ttb22">
                                          品位：
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='600'/>
                                        </div>
                                        <div class="ttb22">
                                          时尚
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='601'/>
                                        </div>
                                        <div class="ttb22">
                                       浪漫
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='602'/>
                                        </div>
                                        <div class="ttb22">
                                         八卦
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='603'/>
                                        </div>
                                        <div class="ttb22">
                                    幽默
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='604'/>
                                        </div>
                                        <div class="ttb22">
                                      严肃
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='605'/>
                                        </div>
                                        <div class="ttb22">
                                     随和
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='606'/>
                                        </div>
                                        <div class="ttb22">
                                    自然
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='607'/>
                                        </div>
                                        <div class="ttb22">
                                      活泼
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='608'/>
                                        </div>
                                        <div class="ttb22">
                                         宅
                                        </div>                     
                                      </div>   
                                      <div class="tbbg">
                                        <div class="ttb22">
                                          时代：
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='700'/>
                                        </div>
                                        <div class="ttb22">
                                          成熟
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='701'/>
                                        </div>
                                        <div class="ttb22">
               60后
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='702'/>
                                        </div>
                                        <div class="ttb22">
               70后
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='703'/>
                                        </div>
                                        <div class="ttb22">
               80后
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='704'/>
                                        </div>
                                        <div class="ttb22">
               90后
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='705'/>
                                        </div>
                                        <div class="ttb22">
                                         调皮
                                        </div>                     
                                      </div>  
                                      <div class="tbbg">
                                        <div class="ttb22">
                                         娱乐：
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='800'/>
                                        </div>
                                        <div class="ttb22">
                                          综艺
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='801'/>
                                        </div>
                                        <div class="ttb22">
                                        大片
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='802'/>
                                        </div>
                                        <div class="ttb22">
                                     选秀
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='803'/>
                                        </div>
                                        <div class="ttb22">
                                     美剧
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='804'/>
                                        </div>
                                        <div class="ttb22">
                                        韩剧
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='805'/>
                                        </div>
                                        <div class="ttb22">
                                   日剧
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='806'/>
                                        </div>
                                        <div class="ttb22">
                                     动漫
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='807'/>
                                        </div>
                                        <div class="ttb22">
                                        视频
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='808'/>
                                        </div>
                                        <div class="ttb22">
                                       搞笑
                                        </div>                     
                                      </div>  
                                      <div class="tbbg">
                                        <div class="ttb22">
                                        特别：
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='900'/>
                                        </div>
                                        <div class="ttb22">
                                     星座
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='901'/>
                                        </div>
                                        <div class="ttb22">
                                        命理
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='902'/>
                                        </div>
                                        <div class="ttb22">
                                    偶像
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='903'/>
                                        </div>
                                        <div class="ttb22">
                                     爱心
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='904'/>
                                        </div>
                                        <div class="ttb22">
                                       公益
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='905'/>
                                        </div>
                                        <div class="ttb22">
                                   品茶
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='906'/>
                                        </div>
                                        <div class="ttb22">
                              品酒
                                        </div>
                                        <div class="ttb21">
                                            <input type="checkbox" name='chkboxinterest' value='907'/>
                                        </div>
                                        <div class="ttb22">
                                    园艺
                                        </div>                     
                                      </div>  
                                <div class="tbbg">
                                <div class="tbbg1">
                                    其他：
                                </div>
                                <div class="gxqm1">
                                    <textarea name="interestSet" class="gxqm2" rows="3" cols="50" ></textarea>
                                </div>
                            </div>                              
                                                              
                        <div class="tbbg"> 
                       </div>  
                        <div class="tbbg"> 
                       </div>                                            
                          <div class="yzm">  
                               <div class="tbbg1">                           
                               &nbsp;&nbsp; 验&nbsp;证&nbsp;码
                                </div>                           
                                <div class="yanz">
                                    <div class="tbbgc3">
                                        <INPUT type="text" id=checkcode name=checkcode class="tbbg21" onblur="this.value = DBC2SBC(this.value); check_checkcode_input(this)" maxLength=5 name=interest.value>
                                    </div>         
                                    <div class="tp5">
                                        <div class="tp51">
                                            <img id=verifypic border=0 src='${cpath}/verify/makeCertPic.jsp'>
                                        </div>
                                        <div class="tp51">
                                            &nbsp;&nbsp;<a href="javascript:chgverpic();">看不清？换一张</a>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>                       
                
                            <div class="tbbg">
                                <div class="tbbg1">
                                    &nbsp;&nbsp;
                                </div>
                                <div class="tbbgx21">
                                    <div class="tbbg1">
                                    &nbsp;&nbsp;
                                </div>
                                   <INPUT id=readme type=checkbox CHECKED name=readme>&nbsp;已经阅读并同意《<A href="${cpath}/other/xieyi.jsp" target=_blank>用户协议</A>》和《<A href="${cpath}/other/jfrule.jsp" target=_blank>积分规则</A>》
                                </div>
                            </div>

                            <div class="tp6">
                                <input id="Button2" type="button" onclick="javascript:doRegister();" value="保  存" />
                            </div>
                        </div>
                        <div class=" cb">
                        </div>
                    </div>
                    <div class=" lh10">
                    </div>
                </div>
            </div>
        </div>
					<!--隐藏域-->
			<input type="hidden" name='interest'	value=''/>
			<input type="hidden" name='birthdaySet' value='1'/>
			<input type="hidden" name='certSet'		value='4'/>
			<input type="hidden" name='fcNoSet'		value='4'/>
			<input type="hidden" name='certtype'	value='1'/>
			<input type="hidden" name='userID' value=''/>
			<input type="hidden" name='villageID' id="villageID" value=''  />
			<input type="hidden" name='invitorID' value='${invitorID}'/>
     		<INPUT id=max_file_size type=hidden value=2048152 name=MAX_FILE_SIZE>
			<IMG id=oFileChecker style="WIDTH: 0px; HEIGHT: 0px" onload=check_photo_size()>
       </form>

 <!--页脚 start -->
	<%@ include file="/foot.jsp"%>
 <!--页脚 end --> 
    </div>
    
</body>
</html>
<script>

	var isLoadedMap = 1;
	var geocoder = null;
	var map = null;
	var marker = null;
	function initMap(id, latlng) {
	  document.getElementById("divID").style.width = "300px";
	  document.getElementById("divID").style.height = "240px";
	  latlng = document.getElementById("mapXY").value;

	  var point = null;
	  if (latlng.length != 0) {
		point = new GLatLng(latlng.split(',')[0], latlng.split(',')[1]);
	  }
	  if (GBrowserIsCompatible()) {
		
		  map = new GMap2(document.getElementById(id));
		  var center = new GLatLng(22.52302283989293,114.05628204345703);
								   
		  map.setUIToDefault();
		  geocoder = new GClientGeocoder();
			
		  if (point == null) point = center;
		  map.setCenter(point, 12);
			
		  map.enableScrollWheelZoom();				// 开启鼠标滚轮放大功能     
		  map.addControl(new GLargeMapControl());// 添加一个带有可在四个方向平移、放大、缩小的按钮以及缩放滑块的控件。   
		  map.addControl(new GMapTypeControl());  // 添加一个地图类型的控制条（位于右上方）   

		  getMarket(point);
	  }
	}

	function getMarket(point) {

	  marker = new GMarker(point, { draggable: true });

	  GEvent.addListener(marker, "dragstart", function() {
		map.closeInfoWindow();
	  });

	  GEvent.addListener(marker, "dragend", function() {
		  var latlng = marker.getLatLng();
		  document.getElementById('mapXY').value = latlng.lat() + ',' + latlng.lng();
		  marker.openInfoWindowHtml("您的小区所在位置:<br>"+latlng.lat() + '<br>' + latlng.lng());

	  });
	  map.addOverlay(marker);
	}
	function showAddress(address) {
		  geocoder.getLatLng(
			  address,
			  function(point) {
				  if (!point) {
					alert(address + " not found");
				  } else {
					  map.setCenter(point, 13);
			//		  getMarket(point);
					  marker.setPoint(point);

					  //设置地图坐标
					  var latlng = marker.getLatLng();
					  document.getElementById('mapXY').value = latlng.lat() + ',' + latlng.lng();
				  }
			  }
		  )
	};  

	function my_getbyid(id)
	{

		 itm = null;
		 if (document.getElementById)
		 {
				itm = document.getElementById(id);
		 }
		 else if (document.all)
		 {
				itm = document.all[id];
		 }
		 else if (document.layers)
		 {
				itm = document.layers[id];
		 }		 
		 return itm;
	}

	function chgverpic()
	{
		var pp= Math.round((Math.random()) * 100000000);
		document.getElementById('verifypic').src = "<%=path%>/verify/makeCertPic.jsp?pp="+pp;
	}
	function chkForm_new(objForm)
	{

		var re = /^[_a-zA-Z0-9\-\.]+@([\-_a-zA-Z0-9]+\.)+[a-zA-Z0-9]{2,3}$/;
		var rs = /^[0-9]{2,3}$/;
		var rc = /^[0-9|a-z]{5}$/;

		var password = objForm.password.value;
		var nick = objForm.nick.value;
		var name = objForm.name.value;

		objForm.checkcode.value	= objForm.checkcode.value.toLowerCase();

		var filter = check_durty_words(objForm.nick.value);

		if (nick == "" || nick.replace(/(^\s*)|(\s*$)/g,"").length<2 || nick.replace(/(^\s*)|(\s*$)/g,"").length>16)
		{
			alert("【用户名】不能为空或格式不符合规范\n");
			objForm.nick.focus();
			return false;
		}

		if (filter)
		{
			alert("“"+filter+"”不能在【用户名】中使用\n");
			objForm.nick.focus();
			return false;
		}
	 
		if (password == "" || password.replace(/(^\s*)|(\s*$)/g,"").length < 6 || password.length > 20)
		{
			alert("【密码】不能为空或长度不符合规范\n");
			objForm.password.focus();
			return false;
		}

		if (objForm.password.value != objForm.chkpass.value)
		{
			alert("【确认密码】与密码不一致\n");
			objForm.chkpass.focus();
			return false;
		}
		var work_location = objForm.work_location;
		if (work_location == null || work_location.value == "")
		{
			alert("请选择居住省份\n");
			objForm.work_location.focus();
			return false;
		}
		var work_sublocation = objForm.work_sublocation;
		if (work_sublocation == null )
		{
			alert("请选择居住地市\n");
			objForm.work_sublocation.focus();
			return false;
		}
		if (work_sublocation.value == "" || work_sublocation.value == "0")
		{
			alert("请选择居住地市\n");
			objForm.work_sublocation.focus();
			return false;
		}
		var work_area = objForm.work_area;
		if (work_area == null )
		{
			alert("请选择居住区县\n");
			objForm.work_area.focus();
			return false;
		}
		if (work_area.value == "" || work_area.value == "0")
		{
			alert("请选择居住区县\n");
			objForm.work_area.focus();
			return false;
		}
		var villageID = objForm.villageID;
		var village = objForm.village;
		var mapXY = objForm.mapXY;
		if ((villageID == null ||villageID.value == "") && (village == null || village.value == ""))
		{
			alert("【小区】不能为空\n");
			return false;
		}

		if ((villageID == null ||villageID.value == "") &&  mapXY.value == "")
		{
			alert("请在GOOGLE地图上标注小区位置，点击打开地图，拖拽标注点\n");
			return false;
		}

		var email = objForm.email.value;
		if (email == "" || (!email.match(re)))
		{
			alert("【注册邮箱】不能为空或格式不符合规范\n");
			objForm.email.focus();
			return false;
		}

		for(var i=0;i<email.length;i++)
		{   
		   strCode=email.charCodeAt(i);   
		   if((strCode>65248)||(strCode==12288)){   
					 alert("【注册邮箱】含全角字符，请切换输入法，输入半角字符");
					 objForm.email.focus();
				   return false;
		   } 
		}  

/*
		var certtype = objForm.certtype.value;
		if (certtype == "")
		{
			alert("请选择【证件类型】\n");
			objForm.certtype.focus();
			return false;
		}
		if (name == "" || name.replace(/(^\s*)|(\s*$)/g,"").length<2 || name.replace(/(^\s*)|(\s*$)/g,"").length>50)
		{
			alert("【真实姓名】不能为空或格式不符合规范\n");
			objForm.name.focus();
			return false;
		}
		if (certno.replace(/(^\s*)|(\s*$)/g,"").length == 0 )
		{
			alert("【证件号码】不能为空\n");
			objForm.certno.focus();
			return false;
		}
		var mobile	= objForm.mobile.value;
		var mobilers =/^(1[0-9]{10})$/;
        if(!mobilers.test(mobile))
        {
			alert("【手机】格式不符合规范\n");
			objForm.mobile.focus();
			return false;
        }
		if (picIDPath.value == "")
		{
			alert("请上传【个人照片】\n");
			objForm.picIDPath.focus();
			return false;
		}
*/
		var certno	= objForm.certno.value;
		if (certno != "")
		{
			var chkcertno	= isIdCardNo(certno);
			if (chkcertno != "校验正确！")
			{
				alert("【身份证号码】不符合规范\n");
				objForm.certno.focus();
				return false;
			}
		}

		var picIDPath	= objForm.picIDPath;
        if(picIDPath.value != "" && !check_loadfile(picIDPath))
        {
			return false;
        }

		var fcPicIDPath	= objForm.fcPicIDPath;
        if(fcPicIDPath.value != "" && !check_loadfile(fcPicIDPath))
        {
			return false;
        }

		var famSts = objForm.famSts.value;
		var famStsSet = objForm.famStsSet.value;
        if(famStsSet == "" && famSts != "")
        {
			objForm.famStsSet.value = "1"; 
        }
		
		var liveSts	= objForm.liveSts.value;
		var liveStsSet	= objForm.liveStsSet.value;
        if(liveStsSet == "" && liveSts != "")
        {
			objForm.liveStsSet.value = "1"; 
        }

		var inTime	= objForm.inTime.value;
		var inTimeSet	= objForm.inTimeSet.value;
        if(inTimeSet == "" && inTime != "")
        {
			objForm.inTimeSet.value = "1"; 
        }

		var home_location	= objForm.home_location.value;
		var home_Set	= objForm.home_Set.value;
        if(home_Set == "" && home_location != "")
        {
			objForm.home_Set.value = "1"; 
        }

		var college	= objForm.college.value;
		var highSchool	= objForm.highSchool.value;
		var schoolSet	= objForm.schoolSet.value;
        if(schoolSet == "" && (college != "" || highSchool != "" ))
        {
			objForm.schoolSet.value = "1"; 
        }

		var army	= objForm.army.value;
		var armySet	= objForm.armySet.value;
        if(armySet == "" && army != "")
        {
			objForm.armySet.value = "1"; 
        }

		var work	= objForm.work.value;
		var workSet	= objForm.workSet.value;
        if(workSet == "" && work != "")
        {
			objForm.workSet.value = "1"; 
        }

		var skill = objForm.skill.value;
		var skillSet = objForm.skillSet.value;
        if(skillSet == "" && skill != "")
        {
			objForm.skillSet.value = "1"; 
        }

		var ids = document.getElementsByName("chkboxinterest"); 
		var inter = "";
		for (var i = 0; i < ids.length; i++) 
		{ 
			if(ids[i].checked){
				inter += ids[i].value;
				inter += ",";
			}
		} 
		objForm.interest.value = inter;

		var interestSet	= objForm.interestSet.value;
        if(interestSet == "" )
        {
			objForm.interestSet.value = "1"; 
        }

		var checkcode	= objForm.checkcode.value;
		if (checkcode == "" || !checkcode.match(rc))
		{
			alert("【验证码】不能为空或字符不符合规范\n");
			objForm.checkcode.focus();
			return false;
		}
		if(!document.getElementById("readme").checked)
		{
			alert("您必须同意【用户协议】和【积分规则】才能完成注册\n");
			return false;
		}
		return true;
	}
	function doRegister()
	{
		//var mapXY = document.getElementById("mapXY");
		//alert("地图坐标=" + mapXY.value);
		//return;
		var obj	= document.getElementById('theForm');
		if(!chkForm_new(obj))
		{
			return ;
		}
		obj.submit();
	}
	//mouse lost the checkcode box
	function check_checkcode_input(thisinput)
	{
		
		if(thisinput ==	'force')
		{
			regcheckcodeinfo.className="show null";
			regcheckcodeinfo.innerHTML="请重新输入验证码";	
			return;	
		}

		var count = thisinput.value.replace(/(^\s*)|(\s*$)/g,"").length;
		var rc = /^[0-9|a-z]{5}$/;

		if (count == 0)
		{
			regcheckcodeinfo.className="show null";
			regcheckcodeinfo.innerHTML="系统未检测到您的输入";
		}
		else if (!thisinput.value.toLowerCase().match(rc))
		{
			regcheckcodeinfo.className="show err";
			regcheckcodeinfo.innerHTML="输入不符合规范";
		}
		else
		{
			regcheckcodeinfo.className = "show exactness";
			regcheckcodeinfo.innerHTML = "内容符合规范，可以使用";
		}
	}
	function click_passwd_input(thisinput)
	{
		regpassinfo.className = "show exactness";
		regpassinfo.innerHTML = "填写6～20位的密码";
	}
	function click_village_input(thisinput)
	{
		regvillageinfo.innerHTML = "";
	}

	function check_email_input_new(thisinput)
	{
		for(var i=0;i<thisinput.value.length;i++)
		{   
			strCode=thisinput.value.charCodeAt(i);   
			if((strCode>65248)||(strCode==12288))
			{   
				regemailinfo.className = "show err";
				regemailinfo.innerHTML = "含全角字符，请输入半角";
				return false;
			} 
		}  
			
		var re = /^[_a-zA-Z0-9\-\.]+@([\-_a-zA-Z0-9]+\.)+[a-zA-Z0-9]{2,3}$/;
		if ( (thisinput.value == "") ) {
			regemailinfo.className = "show null";
			regemailinfo.innerHTML = "系统未检测到您的输入";
		}
		else if (!thisinput.value.match(re))
		{
			regemailinfo.className = "show err";
			regemailinfo.innerHTML = "输入不符合规范";
		}
		else
		{
			regemailinfo.className = "show exactness";
			verity("email", thisinput.value);
		}
	}
	//mouse lost the passwd box
	function check_passwd_input(thisinput)
	{

		var count = thisinput.value.replace(/(^\s*)|(\s*$)/g,"").length;

		if (thisinput.value.replace(/(^\s*)|(\s*$)/g,"") == "") {
			regpassinfo.className="show null";
			regpassinfo.innerHTML="系统未检测到您的输入";
		}
		else if (count < 6 || count > 20)
		{
			regpassinfo.className = "show err";
			regpassinfo.innerHTML = "输入不符合规范";
		}
		else
		{
			regpassinfo.className = "show exactness";
			regpassinfo.innerHTML = "<img src='${cpath}/icon/png-0644.png'/>";
		}
	}
	//mouse onclick the chkpass box
	function click_chkpass_input(thisinput)
	{
		var oPass = theForm.password.value;
		if( oPass == "")
		{
			theForm.password.focus();
		}else{
			regpass2info.className="show exactness";
			regpass2info.innerHTML="请输入确认密码";
		}
	}

	//mouse lost the chkpass box
	function check_chkpass_input(thisinput)
	{
		var oPass = theForm.password.value;
		if(thisinput.value.replace(/(^\s*)|(\s*$)/g,"") == "")
		{
			regpass2info.className="show null";
			regpass2info.innerHTML = "系统未检测到您的输入";
		}
		else if(thisinput.value != oPass)
		{
			regpass2info.className="show err";
			regpass2info.innerHTML = "确认密码与密码不一致";
		}
		else
		{
			regpass2info.className = "show exactness";
			regpass2info.innerHTML = "<img src='${cpath}/icon/png-0644.png'/>";
		}
	}
	function check_nick_input(thisinput)
	{
		var filter = check_durty_words(thisinput.value);
		var count = thisinput.value.replace(/(^\s*)|(\s*$)/g,"").length;
		if( count == 0 )
		{
			regnickinfo.className="null";
			regnickinfo.innerHTML="系统未检测到您的输入";
		}
		else if ((thisinput.value != "") && (count < 2 || count > 50)) {
			regnickinfo.className="err";
			regnickinfo.innerHTML="输入不符合规范";
		}
		else if (filter)
		{
			regnickinfo.className = "show err";
			regnickinfo.innerHTML = "“"+filter+"”不能在昵称中使用";
		}
		else
		{
			regnickinfo.className = "show err";
			verity("nick", thisinput.value);
		}

	}
	//filter keywords
	function check_durty_words(thisinput)
	{

		var durty_words = new Array("系统","管理","master","版主","斑竹","客服","root","颁奖","活动","提示","兑奖","通知");
		for(i=0;i<durty_words.length;i++)
		{
			if (thisinput.indexOf(durty_words[i])>=	0)
			{
				return durty_words[i];
			}
		}
		return false;
	}
	function DBC2SBC (str) {
		var i;
		var result='';
		for(i=0; i < str.length; i++)
		{
			code = str.charCodeAt(i);

			if (code == 12290)
			{
				result += String.fromCharCode(46);
			}
			else if (code == 183)
			{
				result += String.fromCharCode(64);
			}
			else if(code >= 65281 && code<65373)
			{
				result += String.fromCharCode(str.charCodeAt(i)-65248);
			}
			else
			{
				result += str.charAt(i);
			}
		}
		return result;
	}
	function chkVillage()
	{
	/*		
		var village = theForm.village.value;
		var villageID = theForm.villageID.value;

		alert(villageID);
		if(villageID == "" && village != ""){

			regvillageinfo.innerHTML = "创建新社区";		
			my_getbyid('gbzhdiv').style.display="";
			initMap('divID','');
		}
		if(villageID != "" && village != ""){
			regvillageinfo.innerHTML = "";		
			my_getbyid('gbzhdiv').style.display="none";
		}
		if(village == ""){
			regvillageinfo.innerHTML = "所在社区未检测到输入";		
		}
	*/
	
	//取得小区信息

	


	}

	function chgArmy(is)
	{
		if(is == '1'){
		
			my_getbyid('spanarmy').style.display="";
		}else{
		
			my_getbyid('spanarmy').style.display="none";
		}
	}
	function create_village()
	{
		regvillageinfo.className = "";
		villagediv.innerHTML = "<input type='text' name='village' maxlength='150' value='' class='short' />";
		regvillageinfo.innerHTML = "<a style='cursor: pointer; color: Blue;' onclick='cancel_create_village();'>取消创建</a>";
		my_getbyid('gbzhdiv').style.display="";
		my_getbyid('gmimgdiv').style.display="none";
	}
	function cancel_create_village()
	{

		if(my_getbyid('work_area') != null ){
			getVillage('villagediv',my_getbyid('work_area').value);
		}else{
			villagediv.innerHTML = "<select name='villageID' onkeydown='catch_keydown(this);'></select>";
		}
		my_getbyid('gbzhdiv').style.display="none";
		my_getbyid('gmimgdiv').style.display="";

		regvillageinfo.className = "";
		regvillageinfo.innerHTML = "<a style='cursor: pointer; color: Blue;' onclick='create_village();'>创建新的社区</a>";
	}


	//mouse lost the chkpass box
	function check_certno_input(thisinput)
	{
		var ocertno = theForm.certno.value;
		var certtype = theForm.certtype.value;

		if(thisinput.value.replace(/(^\s*)|(\s*$)/g,"") == "")
		{
			regcertnoinfo.className="show null";
			regcertnoinfo.innerHTML = "系统未检测到您的输入";
		}
		else
		{
			regcertnoinfo.className = "show exactness";
			if(certtype == "1"){			
				regcertnoinfo.innerHTML = isIdCardNo(thisinput.value);
			}
		}
	}
	//这个可以验证15位和18位的身份证，并且包含生日和校验位的验证。   
	//如果有兴趣，还可以加上身份证所在地的验证，就是前6位有些数字合法有些数字不合法。 
	function isIdCardNo(num) 
	{   
		num = num.toUpperCase();  
		//身份证号码为15位或者18位，15位时全为数字，18位前17位为数字，最后一位是校验位，可能为数字或字符X。   
		if (!(/(^\d{15}$)|(^\d{17}([0-9]|X)$)/.test(num)))   
		{ 
//		  alert('输入的身份证号长度不对，或者号码不符合规定！\n15位号码应全为数字，18位号码末位可以为数字或X。'); 
		  return '输入的身份证号长度不对'; 
		 } 
		//校验位按照ISO 7064:1983.MOD 11-2的规定生成，X可以认为是数字10。 
		//下面分别分析出生日期和校验位 
		var len, re; 
		len = num.length; 
		if (len == 15) 
		{ 
			re = new RegExp(/^(\d{6})(\d{2})(\d{2})(\d{2})(\d{3})$/); 
			var arrSplit = num.match(re); 

			//检查生日日期是否正确 
			var dtmBirth = new Date('19' + arrSplit[2] + '/' + arrSplit[3] + '/' + arrSplit[4]); 
			var bGoodDay; 
			bGoodDay = (dtmBirth.getYear() == Number(arrSplit[2])) && ((dtmBirth.getMonth() + 1) == Number(arrSplit[3])) && (dtmBirth.getDate() == Number(arrSplit[4])); 
			if (!bGoodDay) 
			{ 
				return '输入的身份证号里出生日期不对！'; 
			} 
			else 
			{ 
				//将15位身份证转成18位 
				//校验位按照ISO 7064:1983.MOD 11-2的规定生成，X可以认为是数字10。 
				var arrInt = new Array(7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2); 
				var arrCh = new Array('1', '0', 'X', '9', '8', '7', '6', '5', '4', '3', '2'); 
				var nTemp = 0, i;   
					num = num.substr(0, 6) + '19' + num.substr(6, num.length - 6); 
				for(i = 0; i < 17; i ++) 
				{ 
					nTemp += num.substr(i, 1) * arrInt[i]; 
				 } 
				 num += arrCh[nTemp % 11];   
				 return '校验正确！';   
			}   
		} 
		if (len == 18) 
		{ 
			re = new RegExp(/^(\d{6})(\d{4})(\d{2})(\d{2})(\d{3})([0-9]|X)$/); 
			var arrSplit = num.match(re); 

			//检查生日日期是否正确 
			var dtmBirth = new Date(arrSplit[2] + "/" + arrSplit[3] + "/" + arrSplit[4]); 
			var bGoodDay; 
			bGoodDay = (dtmBirth.getFullYear() == Number(arrSplit[2])) && ((dtmBirth.getMonth() + 1) == Number(arrSplit[3])) && (dtmBirth.getDate() == Number(arrSplit[4])); 
			if (!bGoodDay) 
			{ 
//				alert(dtmBirth.getYear()); 
//				alert(arrSplit[2]); 
//				alert('输入的身份证号里出生日期不对！'); 
				return '输入的身份证号里出生日期不对！'; 
			} else { 
				//检验18位身份证的校验码是否正确。 
				//校验位按照ISO 7064:1983.MOD 11-2的规定生成，X可以认为是数字10。 
				var valnum; 
				var arrInt = new Array(7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2); 
				var arrCh = new Array('1', '0', 'X', '9', '8', '7', '6', '5', '4', '3', '2'); 
				var nTemp = 0, i; 
				for(i = 0; i < 17; i ++) 
				{ 
					nTemp += num.substr(i, 1) * arrInt[i]; 
				} 
				valnum = arrCh[nTemp % 11]; 
				if (valnum != num.substr(17, 1)) 
				{ 
//					alert('18位身份证的校验码不正确！应该为：' + valnum); 
					return '18位身份证的校验码不正确'; 
				} 
				return '校验正确！'; 
			} 
		} 
		return '校验正确！'; 
	}
	function check_photo_size()
	{
			img_temp = my_getbyid('oFileChecker');
			var limit = parseInt(my_getbyid('max_file_size').value);
			if (img_temp.fileSize > limit) {
					alert("照片文件过大，请选择2M以下的文件上传");
					return false;
			}
	}
	function check_loadfile(filePicker)
	{
			var patn = /.jpg$|.jpeg$|.gif$/i;  
			if(patn.test(filePicker.value)) {
					img_temp = my_getbyid('oFileChecker');
					img_temp.src = filePicker.value;
			} else {
						alert('您选择的不是合法的图片文件,支持文件格式：.jpg/.jpeg/.gif，请重新选择');
						filePicker.value='';
						return false;
			}
			return true;
	}		
	//mouse lost the chkpass box
	function check_picIDPath_new(thisinput)
	{
		var ocertno = theForm.picIDPath.value;
		if(thisinput.value.replace(/(^\s*)|(\s*$)/g,"") == "")
		{
			regpicIDPathinfo.className="show null";
			regpicIDPathinfo.innerHTML = "系统未检测到您的输入";
		}
		else
		{
			regpicIDPathinfo.className = "show exactness";

			check_loadfile(thisinput);
		}
	}
	function getVillage(id,village)
	{
		
		if(village == ""){
			return;
		}
		var work_area = theForm.work_area.value;
		if(work_area == 0 || work_area == ""){
			alert("请选择所在区县");
			return;
		}

		//根据小区名称定位
		showAddress(village);

		var xmlHttp;
		start = true;
		try
		{    // Firefox, Opera 8.0+, Safari    
			xmlHttp=new XMLHttpRequest();
		}
		catch (e)
		{    // Internet Explorer    
			try
			{
				xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
			}
			catch (e)
			{
				try
				{
					xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
				}
				catch (e)
				{
					alert("Your browser does not support AJAX!");
					return false;
				}
			}
		}
		var url;
		
		url = "${cpath}/shequ/getVillage.jsp?village=" + encodeURIComponent(village) + "&work_area=" + work_area;
		if (start)
		{
			xmlHttp.onreadystatechange=function()
			{
				if(xmlHttp.readyState==4 && xmlHttp.status==200)
				{
					var ret_str = xmlHttp.responseText;

					if(ret_str.replace(/(^\s*)|(\s*$)/g,"") == "社区不存在"){
						if(window.confirm("社区不存在，是否创建社区？")){
							regvillageinfo.innerHTML = "创建新社区";		
							my_getbyid('gbzhdiv').style.display="";
							//initMap('divID','');							
						}else{
							my_getbyid(id).value = "";
							my_getbyid("village").value = "";
							my_getbyid("village").focus();
						}
					}else{
						my_getbyid(id).value = ret_str.replace(/(^\s*)|(\s*$)/g,"");
						regvillageinfo.innerHTML = "<img src='${cpath}/icon/png-0644.png'/>";		
					}
				}
			}
			xmlHttp.open("GET",url,true);
			xmlHttp.send(null);
		}
	}
   /**
    * 

	function getVillage(div,id)
	{

		var xmlHttp;
		start = true;
		try
		{    // Firefox, Opera 8.0+, Safari    
			xmlHttp=new XMLHttpRequest();
		}
		catch (e)
		{    // Internet Explorer    
			try
			{
				xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
			}
			catch (e)
			{
				try
				{
					xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
				}
				catch (e)
				{
					alert("Your browser does not support AJAX!");
					return false;
				}
			}
		}
		var url;
		
		url = "${cpath}/shequ/getVillage.jsp?work_area=" + id ;
		my_getbyid(div).innerHTML="<select name='villageID' onkeydown='catch_keydown(this);'></select>";
		if (start)
		{
			my_getbyid(div).innerHTML='后台取数据……';
			xmlHttp.onreadystatechange=function()
			{
				if(xmlHttp.readyState==4 && xmlHttp.status==200)
				{
					var ret_str = xmlHttp.responseText;

					var secsort = "<select name='villageID' onkeydown='catch_keydown(this);'>" +
							ret_str.replace(/(^\s*)|(\s*$)/g,"") + "</select>";
					my_getbyid(div).innerHTML = secsort;
				}
			}
			xmlHttp.open("GET",url,true);
			xmlHttp.send(null);
		}
	}
    */
	
	/*
	*/
	function verity(id,value)
	{
		var xmlHttp;
		start = true;
		try
		{    // Firefox, Opera 8.0+, Safari    
			xmlHttp=new XMLHttpRequest();
		}
		catch (e)
		{    // Internet Explorer    
			try
			{
				xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
			}
			catch (e)
			{
				try
				{
					xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
				}
				catch (e)
				{
					alert("Your browser does not support AJAX!");
					return false;
				}
			}
		}
		var url;
		url = "${cpath}/VerityInfo?id="+id+"&value=" + encodeURIComponent(value);
		if (start)
		{
			my_getbyid('reg'+id + 'info').innerHTML='后台校验……';
			xmlHttp.onreadystatechange=function()
			{
				if(xmlHttp.readyState==4 && xmlHttp.status==200)
				{
					var ret_str = xmlHttp.responseText;
					if(ret_str == "该昵称在此刻还没有人使用！" ||  ret_str == "该Email还没有注册，欢迎加入！"){
					
						my_getbyid('reg'+id + 'info').innerHTML = "<img src='${cpath}/icon/png-0644.png'/>";
					}else{
					
						my_getbyid('reg'+id + 'info').innerHTML = ret_str;
					}
				}
			}
			xmlHttp.open("GET",url,true);
			xmlHttp.send(null);
		}
	}
	function getAjaxdata(div,id, isLocateAddress, thisObj)
	{

		var xmlHttp;
		start = true;
		try
		{    // Firefox, Opera 8.0+, Safari    
			xmlHttp=new XMLHttpRequest();
		}
		catch (e)
		{    // Internet Explorer    
			try
			{
				xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
			}
			catch (e)
			{
				try
				{
					xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
				}
				catch (e)
				{
					alert("Your browser does not support AJAX!");
					return false;
				}
			}
		}
		var url;
		if(div =="divsecsort"){

			url = "${cpath}/param/getproperty.jsp?assortID=2&parentID=" + id ;

		}else if(div =="cnpid" ){
		
			url = "${cpath}/param/getCnpid.jsp?pid=" + id ;
			my_getbyid("cncid").innerHTML="<select name='work_area' onkeydown='catch_keydown(this);'></select>";
		}else if(div =="homepid" ){
		
			url = "${cpath}/param/getCnpid.jsp?pid=" + id ;
//			my_getbyid("homecid").innerHTML="<select name='home_Area' onkeydown='catch_keydown(this);'></select>";
		}else {

			url = "${cpath}/param/getCncid.jsp?cid=" + id;
		}
		if (start)
		{
			my_getbyid(div).innerHTML='后台取数据……';
			xmlHttp.onreadystatechange=function()
			{
				if(xmlHttp.readyState==4 && xmlHttp.status==200)
				{
					var ret_str = xmlHttp.responseText;
					if(div =="divsecsort"){
						var secsort = "<select name='secsort' onkeydown='catch_keydown(this);'>" +
							ret_str.replace(/(^\s*)|(\s*$)/g,"") + "</select>"
						my_getbyid(div).innerHTML = secsort;

					}else if(div =="cnpid"){

						var secsort = "<select name='work_sublocation' onkeydown='catch_keydown(this);'" +
							" class='sect' onChange=\"getAjaxdata('cncid',this.value)\">" + 
							ret_str.replace(/(^\s*)|(\s*$)/g,"") + "</select>"
						my_getbyid(div).innerHTML = secsort;

					}else if(div =="homepid"){

						var secsort = "<select name='home_sublocation' onkeydown='catch_keydown(this);'" +
							" class='sect' " + 
							ret_str.replace(/(^\s*)|(\s*$)/g,"") + "</select>"
						my_getbyid(div).innerHTML = secsort;

					}else if(div =="homecid"){

						var secsort = "<select name='home_area' id='home_area' class='sect' onkeydown='catch_keydown(this);'>" +
							ret_str.replace(/(^\s*)|(\s*$)/g,"") + "</select>"
						my_getbyid(div).innerHTML = secsort;

					}else{
						var secsort = "<select name='work_area' id='work_area' class='sect' onkeydown='catch_keydown(this);' >" +
							ret_str.replace(/(^\s*)|(\s*$)/g,"") + "</select>"
						my_getbyid(div).innerHTML = secsort;
					}
				}
			}
			xmlHttp.open("GET",url,true);
			xmlHttp.send(null);
		}

		if(isLocateAddress == true) {
			locateAddress(thisObj);
		}
	}

	//根据地址定位
	function locateAddress(selectObj) {
		//显示地图位置
		if(map == null) {
			my_getbyid('gbzhdiv').style.display="";
			initMap('divID','');	
		}

		var index = selectObj.selectedIndex; // 选中索引
		var text = selectObj.options[index].text; // 选中文本
		var value = selectObj.options[index].value; // 选中值
		//alert(text);
		showAddress(text);
	}

	/*
	//图片预览
	var ip = new ImagePreview( $$("personalFile"), $$("personalImg"), {
		maxWidth: 200, maxHeight: 200, action: "<%=path%>/imageview/viewImg.jsp"
	});
	ip.img.src = ImagePreview.TRANSPARENT;
	ip.file.onchange = function(){ ip.preview(); };
	*/
	
</script>
